package mud.unit;

/** Common interface for actions that can be performed */
public abstract class Action {

    /** whether this action will consume a turn when used in combat */
    private final boolean combatRestricted;
    
    /**
     * Constructs a new Action
     * @param combatRestricted whether this action will consume a turn when used
     *        in combat
     */
    public Action(boolean combatRestricted) {
        this.combatRestricted = combatRestricted;
    }
    
    /**
     * Performs the action
     */
    public abstract void perform();

    /**
     * @return whether this action will consume a turn when used in combat
     */
    public boolean isTurnConsumed() {
        return combatRestricted;
    }
}
